.register_page {
  width: 100vw;
  background-color: var(--theme-bg-secondary);
  color: var(--theme-text-primary);
  font-family: 'PingFang SC', 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei', 'Arial', sans-serif;
  min-height: max(884px, 100dvh);

  .container {
    max-width: 100%;
    margin: 0 auto;
  }

  // 头部导航
  .header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--theme-bg-secondary);

    .backButton {
      background: none;
      border: none;
      color: var(--theme-text-primary);
      cursor: pointer;
      padding: 8px;

      .backIcon {
        font-family: 'Material Icons', serif;
        font-size: 20px;
      }
    }

    .title {
      font-size: 18px;
      font-weight: bold;
      text-align: center;
      flex-grow: 1;
      margin: 0;
    }
  }

  // 主要内容区域
  .mainContent {
    background-color: var(--theme-bg-secondary);
    padding: 30px 16px 32px;

    // 输入组
    .inputGroup {
      margin-bottom: 32px;

      .inputLabel {
        display: block;
        font-size: 14px;
        font-weight: 500;
        color: var(--theme-text-secondary);
        margin-bottom: 8px;
      }

      // 性别选择样式
      .genderWrapper {
        display: flex;
        gap: 12px;
        margin-top: 8px;

        .genderButton {
          flex: 1;
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 8px;
          padding: 12px 16px;
          border-radius: 8px;
          border: 1px solid var(--theme-border-primary);
          background-color: var(--theme-bg-input);
          color: var(--theme-text-primary);
          transition: all 0.2s ease;
          cursor: pointer;

          &:hover {
            background-color: var(--theme-border-primary);
          }

          // 选中状态样式 - 默认蓝色
          &.selected {
            background-color: var(--theme-accent-info);
            border-color: var(--theme-accent-info);
            color: var(--theme-text-primary);

            &:hover {
              background-color: var(--theme-accent-info);
              border-color: var(--theme-accent-info);
            }

            // 选中时图标和文字都是白色
            .genderIcon img {
              filter: brightness(0) invert(1);
            }
          }

          // 男性按钮选中状态 - 蓝色
          &.maleButton.selected {
            background-color: var(--theme-accent-info);
            border-color: var(--theme-accent-info);

            &:hover {
              background-color: var(--theme-accent-info);
              border-color: var(--theme-accent-info);
            }
          }

          // 女性按钮选中状态 - 粉色
          &.femaleButton.selected {
            background-color: var(--theme-primary);
            border-color: var(--theme-primary);

            &:hover {
              background-color: var(--theme-primary);
              border-color: var(--theme-primary);
            }
          }

          .genderIcon {
            display: flex;
            align-items: center;
            justify-content: center;

            img {
              width: 20px;
              height: 20px;
              transition: filter 0.2s ease;
            }
          }

          .genderText {
            font-size: 14px;
            font-weight: 500;
          }
        }

        // 男性按钮 - 未选中时图标蓝色
        .maleButton:not(.selected) .genderIcon img {
          filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(200deg) brightness(104%) contrast(97%);
        }

        // 女性按钮 - 未选中时图标粉色
        .femaleButton:not(.selected) .genderIcon img {
          filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
        }
      }

      .passwordInput,
      .confirmPasswordInput {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        background-color: var(--theme-bg-input);
        color: var(--theme-text-primary);
        border: 1px solid var(--theme-border-primary);
        border-radius: 6px;
        padding: 16px;
        font-size: 16px;
        height: 48px;
        outline: none;

        &:focus {
          border-color: var(--theme-primary);
          box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.2);
        }

        &::placeholder {
          color: var(--theme-text-muted);
        }
      }

      // 邮箱和验证码按钮容器
      .emailWrapper {
        display: flex;
        gap: 12px;
        align-items: flex-start;
      }

      // 邮箱输入框（在一行布局中）
      .emailInput {
        flex: 1;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        background-color: var(--theme-bg-input);
        color: var(--theme-text-primary);
        border: 1px solid var(--theme-border-primary);
        border-radius: 6px;
        padding: 16px;
        font-size: 16px;
        height: 48px;
        outline: none;

        &:focus {
          border-color: var(--theme-primary);
          box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.2);
        }

        &::placeholder {
          color: var(--theme-text-muted);
        }
      }

      // 验证码按钮样式
      .codeBtn {
        flex-shrink: 0;
        width: 120px;
        background-color: var(--theme-primary);
        color: var(--theme-text-primary);
        border: none;
        border-radius: 6px;
        padding: 16px 12px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.2s ease;
        height: 48px;
        white-space: nowrap;

        &:hover:not(:disabled) {
          background-color: var(--theme-primary-dark);
        }

        &:disabled {
          background-color: var(--theme-text-muted);
          cursor: not-allowed;
        }
      }

      // 邀请码容器（WY前缀+输入框）
      .inviteCodeWrapper {
        display: flex;
        align-items: stretch;
        width: 100%;
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);

        // 当输入框获得焦点时，整个容器添加焦点效果
        &:focus-within {
          box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
          
          .inviteCodePrefix {
            background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary) 100%);
            border-color: var(--theme-primary);
            transform: scale(1.02);
          }
        }
      }

      // WY前缀样式 - 现代渐变设计
      .inviteCodePrefix {
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--theme-accent-info) 0%, var(--theme-accent-info) 100%);
        color: var(--theme-text-primary);
        border: 1px solid var(--theme-accent-info);
        border-right: none;
        padding: 0 14px;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 1px;
        white-space: nowrap;
        min-width: 54px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);

        // 添加光泽效果
        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          height: 50%;
          background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
          pointer-events: none;
        }

        // 添加右侧分割线装饰
        &::after {
          content: '';
          position: absolute;
          right: 0;
          top: 50%;
          transform: translateY(-50%);
          width: 2px;
          height: 24px;
          background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
        }
      }

      // 邀请码输入框（连接WY前缀）
      .inviteCodeInput {
        flex: 1;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        background-color: var(--theme-bg-input);
        color: var(--theme-text-primary);
        border: 1px solid var(--theme-border-primary);
        border-left: none;
        padding: 16px 18px;
        font-size: 16px;
        height: 48px;
        outline: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

        &:focus {
          background-color: var(--theme-bg-primary);
          border-color: var(--theme-primary);
        }

        &::placeholder {
          color: var(--theme-text-muted);
          font-weight: 400;
        }

        // 禁用状态 - 更柔和的样式
        &:disabled {
          background: linear-gradient(135deg, var(--theme-bg-secondary) 0%, var(--theme-border-primary) 100%);
          color: var(--theme-text-secondary);
          cursor: not-allowed;
          opacity: 0.7;
        }
      }

      // 禁用状态的容器样式
      .inviteCodeWrapper:has(.inviteCodeInput:disabled) {
        opacity: 0.75;
        
        .inviteCodePrefix {
          background: linear-gradient(135deg, var(--theme-bg-secondary) 0%, var(--theme-text-muted) 100%);
          border-color: var(--theme-bg-secondary);
        }
      }
    }

    // 注册按钮
    .registerButtonGroup {
      margin-bottom: 32px;

      .registerButton {
        width: 100%;
        background-color: var(--theme-primary);
        color: var(--theme-text-primary);
        border: none;
        border-radius: 24px;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        transition: background-color 0.2s ease;
        height: 48px;

        &:hover {
          background-color: var(--theme-primary-dark);
        }

        &:active {
          background-color: var(--theme-primary-dark);
        }
      }
    }

    // 登录链接
    .loginLink {
      text-align: center;
      margin-bottom: 0;

      .loginText {
        font-size: 14px;
        color: var(--theme-text-secondary);
        margin: 0;

        .loginSpan {
          color: var(--theme-primary);
          cursor: pointer;

          &:hover {
            color: var(--theme-primary-dark);
          }
        }
      }
    }

    // 分隔线
    .separator {
      display: flex;
      align-items: center;
      margin-bottom: 32px;

      .separatorLine {
        flex-grow: 1;
        height: 1px;
        background-color: var(--theme-border-primary);
      }

      .separatorText {
        padding: 0 16px;
        font-size: 14px;
        color: var(--theme-text-muted);
      }
    }

    // 其他登录方式
    .otherLogin {
      display: flex;
      justify-content: center;

      .phoneButton {
        background-color: var(--theme-bg-input);
        border: none;
        border-radius: 50%;
        width: 60px;
        height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
          background-color: var(--theme-border-primary);
        }

        .phoneIcon {
          font-family: 'Material Icons', serif;
          font-size: 20px;
          color: var(--theme-text-primary);
        }

        .phoneText {
          font-size: 10px;
          color: var(--theme-text-muted);
          margin-top: 4px;
          white-space: nowrap;
        }
      }
    }
  }
}

// 全局样式覆盖
:global {
  .adm-input {
    --font-size: 16px;
    font-weight: normal;
    color: var(--theme-text-primary) !important;
    background-color: var(--theme-bg-input) !important;
    border: 1px solid var(--theme-border-primary) !important;
    border-radius: 6px !important;
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: 48px !important;

    &::placeholder {
      color: var(--theme-text-muted) !important;
    }

    &:focus {
      border-color: var(--theme-primary) !important;
      box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.2) !important;
      color: var(--theme-text-primary) !important;
    }
  }

  .adm-button {
    font-size: 16px;
  }
  .adm-list-body{
    background-color: transparent !important;
    border: none !important;
  }
  .adm-dialog-body{
    padding-top: 0 !important;
  }
  .adm-center-popup-body {
    background-color: var(--theme-bg-primary);
    color: var(--theme-text-primary) !important;
  }
  .adm-dialog-footer .adm-dialog-action-row{
    border:0 !important;
  }
}